package com.yeyks.commonReference.service.hotel;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yeyks.account.dal.domain.AccountInfo;
import com.yeyks.common.appcommon.dto.finance.AppFinanceStatusDTO;
import com.yeyks.common.appcommon.param.finance.QueryWithdrawalOrderParam;
import com.yeyks.common.appcommon.result.CommonPage;
import com.yeyks.common.appcommon.result.CommonResult;
import com.yeyks.common.base.PageResult;
import com.yeyks.common.param.WithdrawalOrderParam;
import com.yeyks.common.param.finance.*;
import com.yeyks.common.result.WithdrawalOrderResult;
import com.yeyks.common.result.withdrawalorder.AgentWithdrawalOrderResult;
import com.yeyks.common.result.withdrawalorder.HotelWithdrawalOrderResult;
import com.yeyks.common.result.withdrawalorder.WithdrawalOrderAgentDownloadResult;
import com.yeyks.common.result.withdrawalorder.WithdrawalOrderDownloadResult;
import com.yeyks.hotel.dal.domain.HotelWithdrawalOrder;

import java.util.List;
import java.util.Map;

/**
 * 酒店房费提现订单表 服务类
 *
 * @author shuai
 * @date 2019-07-08
 */
public interface HotelWithdrawalOrderService extends IService<HotelWithdrawalOrder> {

    /**
     * c2b酒店提现订单查询
     *
     * @param loginUser
     * @param param
     * @return
     */
    PageResult<HotelWithdrawalOrderResult> myC2bHotelList(AccountInfo loginUser, WithdrawalOrderParam param);

    /**
     * c2b代理提现订单查询
     *
     * @param loginUser
     * @param param
     * @return
     */
    PageResult<AgentWithdrawalOrderResult> myC2bAgentList(AccountInfo loginUser, WithdrawalOrderParam param);

    /**
     * 床垫酒店提现订单查询
     *
     * @param loginUser
     * @param param
     * @return
     */
    PageResult<HotelWithdrawalOrderResult> myMattressHotelList(AccountInfo loginUser, WithdrawalOrderParam param);

    /**
     * 床垫代理提现订单查询
     *
     * @param loginUser
     * @param param
     * @return
     */
    PageResult<AgentWithdrawalOrderResult> myMattressAgentList(AccountInfo loginUser, WithdrawalOrderParam param);

    /**
     * vip酒店提现订单查询
     *
     * @param loginUser
     * @param param
     * @return
     */
    PageResult<HotelWithdrawalOrderResult> myVipHotelList(AccountInfo loginUser, WithdrawalOrderParam param);

    /**
     * vip运营商提现订单查询
     *
     * @param loginUser
     * @param param
     * @return
     */
    PageResult<AgentWithdrawalOrderResult> myVipOperatorList(AccountInfo loginUser, WithdrawalOrderParam param);

    /**
     * 小vip酒店提现订单查询
     *
     * @param loginUser
     * @param param
     * @return
     */
    PageResult<HotelWithdrawalOrderResult> myMiniVipHotelList(AccountInfo loginUser, WithdrawalOrderParam param);

    /**
     * 小vip运营商提现订单查询
     *
     * @param loginUser
     * @param param
     * @return
     */
    PageResult<AgentWithdrawalOrderResult> myMiniVipOperatorList(AccountInfo loginUser, WithdrawalOrderParam param);

    /**
     * 查询该用户是否可以提现
     *
     * @param loginUser
     * @param type      0营业提现，1床垫分成提现，2vip佣金提现
     * @return
     */
    Boolean checkWithdrawal(AccountInfo loginUser, Integer type);

    /**
     * 更新提现订单状态
     *
     * @param loginUser
     * @param financeOrderUpdateParam
     * @return
     */
    Boolean myUpdate(AccountInfo loginUser, FinanceOrderUpdateParam financeOrderUpdateParam);

    /**
     * 批量修改提现订单状态为审核通过
     *
     * @param loginUser
     * @param financeOrderUpdateParam
     * @return
     */
    Boolean myUpdateMore(AccountInfo loginUser, FinanceOrderUpdateMoreParam financeOrderUpdateParam);

    /**
     * admin - app分页查询酒店提现记录
     *
     * @param param   输入参数
     * @param convert 操作人
     * @return 返回列表
     */
    CommonResult<CommonPage<HotelWithdrawalOrderResult>> adminAppList(QueryWithdrawalOrderParam param, AccountInfo convert);

    /**
     * admin - app分页查询VIP酒店提现记录
     *
     * @param param   输入参数
     * @param convert 操作人
     * @return 返回列表
     */
    CommonResult<CommonPage<HotelWithdrawalOrderResult>> adminAppVipHotelList(QueryWithdrawalOrderParam param, AccountInfo convert);

    /**
     * admin - app分页查询代理商提现记录
     *
     * @param param   输入参数
     * @param convert 操作人
     * @return 返回列表
     */
    CommonResult<CommonPage<AgentWithdrawalOrderResult>> adminAppC2bAgentList(QueryWithdrawalOrderParam param, AccountInfo convert);

    /**
     * admin - app分页查询VIP运营商提现记录
     *
     * @param param   输入参数
     * @param convert 操作人
     * @return 返回列表
     */
    CommonResult<CommonPage<AgentWithdrawalOrderResult>> adminAppVipAgentList(QueryWithdrawalOrderParam param, AccountInfo convert);

    /**
     * admin - app 获取结算订单状态列表信息
     *
     * @param convert 操作人
     * @return 返回集合
     */
    List<AppFinanceStatusDTO> getStatusList(AccountInfo convert);

    /**
     * 申请提现
     *
     * @param loginUser              申请人
     * @param financeWithdrawalParam 参数
     * @return
     */
    boolean withdrawal(AccountInfo loginUser, FinanceWithdrawalParam financeWithdrawalParam);


    /**
     * c2b酒店申请提现
     *
     * @param loginUser              申请人
     * @param financeWithdrawalParam 参数
     * @return
     */
    boolean c2bHotelWithdrawal(AccountInfo loginUser, FinanceWithdrawalParam financeWithdrawalParam);

    /**
     * c2b代理申请提现
     *
     * @param loginUser              申请人
     * @param financeWithdrawalParam 参数
     * @return
     */
    boolean c2bAgentWithdrawal(AccountInfo loginUser, FinanceWithdrawalParam financeWithdrawalParam);

    /**
     * 床垫酒店申请提现
     *
     * @param loginUser              申请人
     * @param financeWithdrawalParam 参数
     * @return
     */
    boolean mattressHotelWithdrawal(AccountInfo loginUser, FinanceWithdrawalParam financeWithdrawalParam);

    /**
     * 床垫代理申请提现
     *
     * @param loginUser              申请人
     * @param financeWithdrawalParam 参数
     * @return
     */
    boolean mattressAgentWithdrawal(AccountInfo loginUser, FinanceWithdrawalParam financeWithdrawalParam);

    /**
     * vip酒店申请提现
     *
     * @param loginUser              申请人
     * @param financeWithdrawalParam 参数
     * @return
     */
    boolean vipHotelWithdrawal(AccountInfo loginUser, FinanceWithdrawalParam financeWithdrawalParam);

    /**
     * 小vip酒店申请提现
     *
     * @param loginUser              申请人
     * @param financeWithdrawalParam 参数
     * @return
     */
    boolean miniVipHotelWithdrawal(AccountInfo loginUser, FinanceWithdrawalParam financeWithdrawalParam);

    /**
     * vip运营商申请提现
     *
     * @param loginUser              申请人
     * @param financeWithdrawalParam 参数
     * @return
     */
    boolean vipOperatorWithdrawal(AccountInfo loginUser, FinanceWithdrawalParam financeWithdrawalParam);

    /**
     * 小vip运营商申请提现
     *
     * @param loginUser              申请人
     * @param financeWithdrawalParam 参数
     * @return
     */
    boolean miniVipOperatorWithdrawal(AccountInfo loginUser, FinanceWithdrawalParam financeWithdrawalParam);

    /**
     * 获取C2B分佣账户余额
     *
     * @param loginUser
     * @return
     */
    Map<String, Object> c2bRemain(AccountInfo loginUser);

    /**
     * 获取vip分佣账户余额
     *
     * @param loginUser
     * @return
     */
    Map<String, Object> vipRemain(AccountInfo loginUser);

    /**
     * 获取小vip分佣账户余额
     *
     * @param loginUser
     * @return
     */
    Map<String, Object> miniVipRemain(AccountInfo loginUser);

    /**
     * 获取收支账户信息
     *
     * @param loginUser
     * @return
     */
    FinanceBindParam getBankInfo(AccountInfo loginUser);

    /**
     * 绑定或修改银行账户
     *
     * @param loginUser
     * @param financeBindParam
     * @return
     */
    boolean bind(AccountInfo loginUser, FinanceBindParam financeBindParam);

    /**
     * 总公司绑定酒店银行账户
     *
     * @param financeBindParam
     * @return
     */
    boolean bindHotel(FinanceBindHotelParam financeBindParam);

    /**
     * 酒店提现订单导出
     *
     * @param param
     * @return
     */
    List<WithdrawalOrderDownloadResult> hotelOrderDownload(WithdrawalOrderDownloadParam param);

    /**
     * 代理商提现订单导出
     *
     * @param param
     * @return
     */
    List<WithdrawalOrderAgentDownloadResult> agentOrderDownload(WithdrawalOrderDownloadParam param);


}
